package edu.upc.viajes.domain;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Set;
import edu.upc.viajes.domain.Servicio;
import java.util.HashSet;
import javax.persistence.ManyToMany;
import javax.persistence.CascadeType;

@RooJavaBean
@RooToString
@RooEntity
public class Paquete {

    @NotNull
    @Size(max = 10)
    private String paq_cod;

    @NotNull
    @Size(max = 50)
    private String paq_nom;

    @NotNull
    @Size(max = 50)
    private String paq_desc;

    private Float paq_descu;

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date paq_fechini;

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date paq_fechfin;

    private Integer paq_dias;

    private Float paq_costo;

    private Integer paq_cupo;

    @ManyToMany(cascade = CascadeType.ALL)
    private Set<Servicio> Servicio = new HashSet<Servicio>();
}
